package com.baizhi.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Article {
    private Integer id;
    private String name;
    private String image;
    private String content;
//    接收页面传送的日期类型数据
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    private Integer gid;
    private Integer status;
    private Guru guru;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", image='" + image + '\'' +
                ", content='" + content + '\'' +
                ", date=" + date +
                ", gid=" + gid +
                ", status=" + status +
                ", guru=" + guru +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public Guru getGuru() {
        return guru;
    }

    public void setGuru(Guru guru) {
        this.guru = guru;
    }

    public Article(Integer id, String name, String image, String content, Date date, Integer gid, Guru guru) {
        this.id = id;
        this.name = name;
        this.image = image;
        this.content = content;
        this.date = date;
        this.gid = gid;
        this.guru = guru;
    }

    public Article() {
    }
}
